<?php $this->load->view('left'); ?>

<h2>Manage Administrator</h2>
<br />
<br />
<br />
<br />

<table>
<tr><td>Admin_Name</td><td>Purview</td><td>Edit_Admin</td><td>Delete_Admin</td></tr>
	<?php foreach ($tr as $val):?>
		<?php 
		if($val['permit']==1)
		{
			echo "<tr><td><font color=\"red\">".$val['admin_name']."</font></td><td><font color=\"red\">Supper Admin</font></td><td><a href=\"".site_url('welcome/update').'/'.$val['uid']."\">Edit</a></td><td>Can't Delete</td></tr>";
		}
		elseif($val['permit']==0) 
		{
			echo "<tr><td>".$val['admin_name']."</td><td><font color=\"blue\">Upload Admin</font></td><td><a href=\"".site_url('welcome/update').'/'.$val['uid']."\">Edit</a></td><td><a href=\"".site_url('welcome/delete').'/'.$val['uid']."\">Delete</a></td></tr>";
		}
		elseif($val['permit']==3)
		{
			echo "<tr><td>".$val['admin_name']."</td><td><font color=\"green\">Scan Admin</font></td><td><a href=\"".site_url('welcome/update').'/'.$val['uid']."\">Edit</a></td><td><a href=\"".site_url('welcome/delete').'/'.$val['uid']."\">Delete</a></td></tr>";
		}
		?>
	<?php endforeach;?>
</table>
<?php $this->load->view('right'); ?>